package ru.inse.web.module;

import ru.inse.core.dao.InseQueryParam;
import ru.xeden.web.request.UrlParamBuilder;


public class InseUrlParamBuilder<T extends InseQueryParam>
    extends UrlParamBuilder<T>
{

    public static final String CITY_ID = "cityId";       
    
    private String cacheSearch;

    public InseUrlParamBuilder(final T queryParam)
    {
        super(queryParam);
    }
    
    
    public String getSearch()
    {
        if (getQueryParam() == null)
        {
            return "";
        }
        if (cacheSearch != null)
        {
            return cacheSearch;
        }

        StringBuilder sb = new StringBuilder();
        add(CITY_ID, getQueryParam().getCityId(), sb);
        addAdvancedParam(sb);
        cacheSearch = sb.toString();
        return cacheSearch;
    }
    
    protected void addAdvancedParam(StringBuilder sb)
    {
        
    }


    

}
